package com.pattern.command.undocalc;

public class UndoOperatorFactory implements OperatorFactory{

	@Override
	public Operator getOperator(String operator) {
		if ("+".equals(operator)) {
			return new UndoAddOperator();
		} else if ("-".equals(operator)) {
			return new UndoSubOperator();
		} else if ("*".equals(operator)) {
			return new UndoMulOperator();
		} else if ("/".equals(operator)) {
			return new UndoDevOperator();
		}
		return null;
	}

}

